import java.util.Scanner;

public class HJ13 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        reverse(s);
    }

    public static void reverse(String sentence) {
        String[] sp = sentence.split(" ");
        for (int i = sp.length - 1; i >= 0; i--) {
            String revs = sp[i] + " ";
            System.out.print(revs);
        }
    }
}